package apof.model
{
	import apof.dao.Dao;
	
	public class StructureItem extends ApofModel
	{
		public var siid:int;
		public var uid:int=-1;
		public var ctid:int=-1;
		public var amount:Number=0;
		
		public function get consumeType():ConsumeType {
			return Dao.dp.retrive(ConsumeType,ctid) as ConsumeType;
		}
		
		public static function onInit():Boolean {
			var pt:Object=prototype;
			pt.classname="StructureItem";		
			pt.fields=["siid","uid","ctid","amount"];
			pt.fieldTypes=["INT","int","int","int"];
			pt.primaryKey=["siid"];
			pt.foreignKey={};
			return true;
		}
		
		public override function get classInfo():Object {return prototype;}
		public static function get classInfo():Object {return prototype;}
	}
}